package com.example.test_activity.http;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * Created by 旭 on 2017/4/30/030.
 */

public interface ApiServer {

    //登录
    @POST("/loginAction.do")
    @FormUrlEncoded
    @Headers("User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0")
    Observable<ResponseBody> login(@FieldMap Map<String,String> map);

    //验证码
    @GET("/validateCodeAction.do")
    Observable<ResponseBody> getImage();

    //学生信息
    @GET("/menu/top.jsp")
    Call<ResponseBody> getUser();

    //学籍信息
    @GET("/xjInfoAction.do?oper=xjxx")
    Observable<ResponseBody> getInformation();

    //上学期成绩
    @GET("/bxqcjcxAction.do")
    Observable<ResponseBody> getScore();

    //不及格成绩
    @GET("/gradeLnAllAction.do?type=ln&oper=bjg")
    Call<ResponseBody> getScore_no();

    //全部成绩
    @GET("/gradeLnAllAction.do?type=ln&oper=qbinfo&lnxndm=2016-2017学年春(两学期)#qb_2016-2017瀛﹀勾鏄?涓ゅ\uE11F鏈?")
    Call<ResponseBody> getScore_all();

    //课表
    @GET("/xkAction.do?actionType=6")
    Observable<ResponseBody> getSyllabus();

    //选课
    @GET("/xkAction.do?actionType=2&pageNumber=1")
    Observable<ResponseBody> getCourse();
}
